from action.window_action import WindowAction
from action.mouse_action import MouseAction
from selenium.webdriver.chrome.webdriver import WebDriver
from tools.logger import get_logger

__driver = None


def global_driver():
    return __driver


class BaseAction(WindowAction, MouseAction):

    def __init__(self, driver: WebDriver):
        self.driver = driver
        self.logger = get_logger()
        __driver = driver
        MouseAction(self.driver)
        WindowAction(self.driver, self.logger)
